mui('.list-btn').on('tap', '.btn-contact', function() {
	mui(this)[0].classList.add("contact-active");
	var bts=[{title:"从通讯录中选取"},{title:"手工输入"}]
	showActionSheet(bts);
});
mui(".mui-popup-buttons").on("tap", "span",function(){
    if(document.getElementById("name").value!=""&&mui(this).html().indexOf("确定")>-1){
    	
    }
    document.getElementsByClassName("dialog-input")[0].style.display="none";
	document.getElementsByClassName("mui-popup-backdrop")[0].style.display="none";
});
	function unique2(array){
		var n = {},r=[]; //n为hash表，r为临时数组
		for(var i = 0; i < array.length; i++) //遍历当前数组
		{
			if (!n[array[i]]) //如果hash表中没有当前项
			{
				n[array[i]] = true; //存入hash表
				r.push(array[i]); //把当前数组的当前项push到临时数组里面
			}
		}
		return r;
	}
//给数组中的对象的名字属性进行排序
	function sortname(propertyName) { 
		return function (object1, object2) { 
			var value1 = object1[propertyName]; 
			var value2 = object2[propertyName]; 
			return value1.localeCompare(value2)
		} 
	}
	function showActionSheet(bts){
		outSet( "弹出系统选择按钮框：" );
//		var bts=[{title:"警告",style:"destructive"},{title:"按钮1"},{title:"按钮2"},{title:"按钮3"}];
		plus.nativeUI.actionSheet({title:"ActionSheet标题",cancel:"取消",buttons:bts},function(e){
			if(e.index>0){
				if(bts[e.index-1].title=="从通讯录中选取"){
					location.href="index2.html";
				}
				if(bts[e.index-1].title=="手工输入"){
					document.getElementsByClassName("dialog-input")[0].style.display="block";
					document.getElementsByClassName("mui-popup-backdrop")[0].style.display="block";
				}
			}else{
				console.log( "User pressed 取消" );
			}
		});
	}